<template>
  <div id="check-management" class="component-wrap">
    <Title :title-msg="titleMsg"></Title>
    <Select :select-length="selectLength"></Select>
    <div class="check-management-lists">
      <Box v-for="(item,index) in checkLists" :key="index" :item="item"></Box>
    </div>
    <img src="../../assets/ic_add@3x.png" class="add"/>
  </div>
</template>

<script type="text/ecmascript-6">
  import Title from '@/components/common/Title.vue'
  import Select from '@/components/common/Select.vue'
  import Box from '@/components/common/CheckBox.vue'

  const list= {
    "checkNum": "09198 120 232382",
    "creator": "王建成",
    "checker": "李晓明",
    "createTime": "2019-03-15",
    "unCheck": 0,
    "hasCheck": 5,
    "checkStatus": "未盘点",
    "inventory": 5,
  }
  const list1= {
    "checkNum": "09198 120 232382",
    "creator": "王建成",
    "checker": "李晓明",
    "createTime": "2019-03-15",
    "unCheck": 59,
    "hasCheck": 5,
    "checkStatus": "已完成",
    "inventory": 0,
  }

  export default {
    name: "checkManagement",
    data:function(){
      return {
        titleMsg: {
          title: "盘点管理",
          back: true,
          scan: false,
          search: true
        },
        checkLists: [ list, list, list1, list1 ]
      }
    },
    computed: {
      selectLength:function(){
        return this.checkLists.length
      }
    },
    components: {
      Title: Title,
      Select: Select,
      Box: Box
    }
  }
</script>

<style scoped>
  #check-management .check-management-lists {
    position: fixed;
    top: 11rem;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: auto;
  }
</style>
